Electronic commerce, often known as “e-commerce”, includes the buying and selling of products or services over electronic systems such as the Internet. The amount of trade conducted electronically has grown immensely with the widespread adoption of internet technology. One particularly explosive area of growth in e-commerce is in the field of advertising and, in particular, video advertising on the Internet.
Many network service systems supporting Internet functionality (“web network service systems”), including those involving the delivery of video over the Internet, are implemented with an object-oriented or pseudo object-oriented software platforms such as the Java® software platform, available from Oracle Corporation. One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any hardware/operating-system platform. This is achieved by compiling the Java language code to an intermediate representation called Java bytecode, instead of directly to platform-specific machine code. Java bytecode instructions are analogous to machine code, but are intended to be interpreted by a virtual machine (VM) written specifically for the host hardware. Standardized libraries provide a generic way to access host-specific features such as graphics, threading, and networking.
One of the most critical performance issues for web service applications written in Java is garbage collection of data on a portion of virtual memory space known as “the heap.” To keep the heap from filling up with obsolete objects a process known as “garbage collection” can be used to remove objects that are no longer being used. The garbage collection operation is associated with an “overhead”, which is a period of time where other processes must be put on hold. Java objects which exist on the heap for a very short amount of time contribute very little to overhead during garbage collection. Objects which exist long enough on the heap to get moved into an “old generation space” have a high overhead during garbage collection.
Java uses an automatic garbage collector to manage memory in the object life-cycle. The programmer determines when objects are created, and the Java runtime is responsible for recovering the memory once objects are no longer in use. Once no references to an object remain, the unreachable memory becomes eligible to foe (reed automatically by the garbage collector. Something similar to a memory leak may still occur if a programmer's code holds a reference to an object that is no longer needed, typically when objects that are no longer needed are stored in containers that are still in use. If methods for a nonexistent object are called, a “null pointer exception” is thrown.
Java contains multiple types of garbage collectors. A common garbage collection is known alternatively as the “Concurrent Mark Sweep Collector” and the “CMS Garbage Collector.” However, there are also several other garbage collectors that can be used to manage Java heap memory.
One of the ideas behind Java's automatic memory management model is that programmers can be spared the burden of having to perform manual memory management. Unfortunately, with Java, garbage collection may happen at any time. Ideally, it will occur when a program is idle. However, it is guaranteed to be triggered if there is insufficient free memory on the heap to allocate a new object, which can cause a program to stall momentarily. Explicit memory management is not possible in Java.
One of the most critical performance issues for web service applications written in Java, such as a video delivery system, is garbage collection of data on the heap. Java objects which exist for a very short amount of time have almost no overhead during garbage collection. But objects which exist long enough to get moved into the old generation space have a high overhead during garbage collection. Since garbage collection is automatic, critical application programs may be put on hold, preventing the timely performance of their functions.
For example, in an Internet-based advertising system that delivers video advertising, an advertisement (“ad”) serving system might be required within 10 to 20 millisecond decision window such that all of the data needed to make the decision must be cached within the virtual memory of the application process. If garbage collection is initiated on the heap memory, the application program will go on hold, and the decision window will be lost.
These and other limitations of the prior art will become apparent to those of skill in the art upon a reading of the following descriptions and a study of the several figures of the drawing.